import request from '@/utils/request'

/** *
 * 获取表信息
 */
function tables(data) {
  return request({
    url: '/sapi/dbms/database/query/tables',
    method: 'post',
    data: data
  })
}

/** *
 * 执行sql查询
 * @param data
 */
function execute(data) {
  return request({
    url: '/sapi/dbms/database/query/execute',
    method: 'post',
    data: data
  })
}
/** *
 * 分析SQL
 * @param data
 */
function analysis(data) {
  return request({
    url: '/sapi/dbms/database/query/analysis',
    method: 'post',
    data: data
  })
}

export default {
  tables,
  execute,
  analysis
}
